<template>
  <el-icon @click="toggleFullScreen">
    <app-icon :icon="!flag?'mdi:arrow-expand-all': 'mdi:arrow-collapse-all'" />
  </el-icon>
</template>

<script setup>

const flag = ref(false)
const toggleFullScreen = () => {
  if (!document.fullscreenElement) {
    document.documentElement.requestFullscreen()
    flag.value = true
  } else {
    if (document.exitFullscreen) {
      document.exitFullscreen()
      flag.value = false
    }
  }
}
</script>

<style lang="scss" scoped></style>
